package com.modules.utils;

import org.apache.shiro.codec.Base64;
import org.apache.shiro.crypto.hash.Md5Hash;

public class EncryptUtils {
	
	public static final String base = "abcdjklmnorstwxyzmmmm0123457";
	
	public static String encBase64(String str) {  
		
	    return Base64.encodeToString(str.getBytes());  
	}  
	 
    public static String decBase64(String str){  
        return Base64.decodeToString(str);  
    }  
	
	public static String md5(String str,String salt){  
        return new Md5Hash(str,salt,1024).toString();  
    }  
}
